using System;
using System.IO;
using System.Threading;
using System.Reflection;
using System.Collections;
using System.Diagnostics;

using StrongMonkey.Core;

using Mono.Addins;

namespace StrongMonkey
{
	public class Runtime
	{
		static IDrupalConnection _drupalConnection;

		public static IDrupalConnection DrupalConnection {
			get { return _drupalConnection; }
		}

		public static void Init ()
		{
		}
		
		private Runtime ()
		{
		}

		static Runtime ()
		{
			AddinManager.Initialize ();
			AddinManager.Registry.Update ();
			// TODO: Connection Gateway
			try {
				_drupalConnection = (IDrupalConnection)AddinManager.GetExtensionObjects (typeof(IDrupalConnection)) [0];				
			} catch (Exception ex) {
				
			}
		}

		private static void ProcessStarterErrorHandler (string a)
		{
		}
	}
}
